package ooday02;

import javax.print.Doc;

public class OverrideDemo {
    public static void main(String[] args) {
        // 重写方法被调用时，看对象的类型执行方法（new谁就调谁）
        Student zg = new Student("张光",24,"廊坊","jsd2410","0010");
        zg.sayHi();

        Teacher ll = new Teacher("李林",28,"加利斯",6000.0);
        ll.sayHi();

        Doctor zl = new Doctor("赵亮",28,"山东","主任医师");
        zl.sayHi();

    }
}
